package designMode.structrueMode.proxy;

/**
 * Created by Administrator on 2018/4/11.
 */
public class Proxy implements Sourceable {

    private Sourceable source;

    public Proxy() {
        this.source = new Source();
    }

    @Override
    public void method() {
        System.out.println("before decorator!");
        source.method();
        System.out.println("after decorator!");
    }

    public static void main(String[] args) {
        Sourceable obj = new Proxy();
        obj.method();
    }
}
